#!/usr/bin/env python
#-*- coding:utf-8 -*-

# file:bookModel.py
# author:ytytyt
# datetime:2021/6/27 15:39
# software: PyCharm
'''
this is functiondescription
'''
# import module your need
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class BookModel(db.Model):
    __tablename__ = 'book_info'

    book_id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(255), nullable=False)
    introduction = db.Column(db.String(3000))
    ISBN = db.Column(db.String(255))
    stock = db.Column(db.Integer, nullable=False)
    image = db.Column(db.String(255))
    category = db.Column(db.Enum('科幻', '都市', '悬疑', '法律', '经济', '推理', '军事', '文学', '科学', '教育', '体育', '语言', '宗教', '艺术'), server_default=db.text("'文学'"))
